package com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training;

import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.dto.BusinessEmployeeTrainingListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.param.BusinessEmployeeTrainingCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.param.BusinessEmployeeTrainingDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.param.BusinessEmployeeTrainingListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.param.BusinessEmployeeTrainingUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 员工培训记录
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Employee Training Management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessEmployeeTrainingCloudServiceFallback.class)
@RequestMapping("/business/employee/training")
public interface BusinessEmployeeTrainingCloudService {

    // 查询员工培训记录列表
    @ApiOperation(value = "Query Employee Training List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.BusinessEmployeeTrainingCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessEmployeeTrainingListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Employee Training List", dataType = "BusinessEmployeeTrainingListCloudParam", dataTypeClass = BusinessEmployeeTrainingListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessEmployeeTrainingListCloudDto list(BusinessEmployeeTrainingListCloudParam param);

    // 创建员工培训记录
    @ApiOperation(value = "Create Employee Training", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.BusinessEmployeeTrainingCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Employee Training", dataType = "BusinessEmployeeTrainingCreateCloudParam", dataTypeClass = BusinessEmployeeTrainingCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessEmployeeTrainingCreateCloudParam param);


    // 编辑员工培训记录
    @ApiOperation(value = "Update Employee Training", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.BusinessEmployeeTrainingCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Employee Training", dataType = "BusinessEmployeeTrainingUpdateCloudParam", dataTypeClass = BusinessEmployeeTrainingUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessEmployeeTrainingUpdateCloudParam param);


    // 删除员工培训记录
    @ApiOperation(value = "Delete Employee Training", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.training.BusinessEmployeeTrainingCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Employee Training", dataType = "BusinessEmployeeTrainingDeleteCloudParam", dataTypeClass = BusinessEmployeeTrainingDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessEmployeeTrainingDeleteCloudParam param);

}
